package com.roncoo.teacher.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.roncoo.teacher.entity.Lecturer;
import com.roncoo.teacher.service.impl.LecturerServiceImpl;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author changpengyu
 * @since 2021-03-24
 */
@RestController
@RequestMapping("/teacher/lecturer")
public class LecturerController {
    @Resource
    private LecturerServiceImpl lecturerService;

    @PostMapping("updStu")
    public Boolean updStu(Lecturer lecturer){
        boolean update = lecturerService.updStu(lecturer);
        return update;
    }
    @PostMapping("findAll")
    public IPage<Lecturer> findAll1(Page page,Lecturer lecturer){
        IPage<Lecturer> list =lecturerService.queryLecturer(page,lecturer);
        return list;
    }
}

